home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-06-15 | 403 b | 19 lines | [TEXT/DWat] |
- % powerlawfit xmin xmax
-
- % DESCRIPTION:
- % For log-log graphs. Fit y = a0 + a1*x for x in the given range.
-
- % ARGUMENTS:
- % xmin = minimum x to include in fit
- % xmax = maximum x to include in fit
-
- % •Note:This script modifies the e vector and replaces the y data
- % with the calclated fit.
-
- rpn <x &1 < <x &2 > + <x &1 >= <x &2 <= * 0.0001 * + >e
-
- fitxy 1
-
- rpn a0 <x a1 * + >y
-
- close